package com.appkubes.mall.core.pojo;

import com.appkubes.mall.core.po.MallEvent;
import com.appkubes.mall.core.po.MallEventExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.session.RowBounds;
import org.apache.ibatis.type.JdbcType;

public interface MallEventMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallEventSqlProvider.class, method="countByExample")
    long countByExample(MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @DeleteProvider(type=MallEventSqlProvider.class, method="deleteByExample")
    int deleteByExample(MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @Delete({
        "delete from mall_event",
        "where event_id = #{eventId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer eventId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @Insert({
        "insert into mall_event (event_id, event_source, ",
        "event_type, event_entity, ",
        "event_entity_key, event_trigger_time, ",
        "version, enent_entity_segments)",
        "values (#{eventId,jdbcType=INTEGER}, #{eventSource,jdbcType=VARCHAR}, ",
        "#{eventType,jdbcType=VARCHAR}, #{eventEntity,jdbcType=VARCHAR}, ",
        "#{eventEntityKey,jdbcType=VARCHAR}, #{eventTriggerTime,jdbcType=TIMESTAMP}, ",
        "#{version,jdbcType=INTEGER}, #{enentEntitySegments,jdbcType=LONGVARCHAR})"
    })
    int insert(MallEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @InsertProvider(type=MallEventSqlProvider.class, method="insertSelective")
    int insertSelective(MallEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallEventSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="event_source", property="eventSource", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_type", property="eventType", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity", property="eventEntity", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity_key", property="eventEntityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_trigger_time", property="eventTriggerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="enent_entity_segments", property="enentEntitySegments", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallEvent> selectByExampleWithBLOBsWithRowbounds(MallEventExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallEventSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="event_source", property="eventSource", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_type", property="eventType", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity", property="eventEntity", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity_key", property="eventEntityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_trigger_time", property="eventTriggerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="enent_entity_segments", property="enentEntitySegments", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<MallEvent> selectByExampleWithBLOBs(MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallEventSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="event_source", property="eventSource", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_type", property="eventType", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity", property="eventEntity", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity_key", property="eventEntityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_trigger_time", property="eventTriggerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallEvent> selectByExampleWithRowbounds(MallEventExample example, RowBounds rowBounds);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @SelectProvider(type=MallEventSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="event_source", property="eventSource", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_type", property="eventType", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity", property="eventEntity", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity_key", property="eventEntityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_trigger_time", property="eventTriggerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<MallEvent> selectByExample(MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @Select({
        "select",
        "event_id, event_source, event_type, event_entity, event_entity_key, event_trigger_time, ",
        "version, enent_entity_segments",
        "from mall_event",
        "where event_id = #{eventId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="event_id", property="eventId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="event_source", property="eventSource", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_type", property="eventType", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity", property="eventEntity", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_entity_key", property="eventEntityKey", jdbcType=JdbcType.VARCHAR),
        @Result(column="event_trigger_time", property="eventTriggerTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="enent_entity_segments", property="enentEntitySegments", jdbcType=JdbcType.LONGVARCHAR)
    })
    MallEvent selectByPrimaryKey(Integer eventId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallEventSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") MallEvent record, @Param("example") MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallEventSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") MallEvent record, @Param("example") MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallEventSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") MallEvent record, @Param("example") MallEventExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @UpdateProvider(type=MallEventSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(MallEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @Update({
        "update mall_event",
        "set event_source = #{eventSource,jdbcType=VARCHAR},",
          "event_type = #{eventType,jdbcType=VARCHAR},",
          "event_entity = #{eventEntity,jdbcType=VARCHAR},",
          "event_entity_key = #{eventEntityKey,jdbcType=VARCHAR},",
          "event_trigger_time = #{eventTriggerTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER},",
          "enent_entity_segments = #{enentEntitySegments,jdbcType=LONGVARCHAR}",
        "where event_id = #{eventId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(MallEvent record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mall_event
     *
     * @mbg.generated
     */
    @Update({
        "update mall_event",
        "set event_source = #{eventSource,jdbcType=VARCHAR},",
          "event_type = #{eventType,jdbcType=VARCHAR},",
          "event_entity = #{eventEntity,jdbcType=VARCHAR},",
          "event_entity_key = #{eventEntityKey,jdbcType=VARCHAR},",
          "event_trigger_time = #{eventTriggerTime,jdbcType=TIMESTAMP},",
          "version = #{version,jdbcType=INTEGER}",
        "where event_id = #{eventId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(MallEvent record);
}